With rapid increase of network scale, stacking technologies emerges as the times require. In the stacking technologies, two or more network devices are connected with one another via a stacking port to compose a stacking system. The stacked network devices are equivalent to one device in logic, and a user manages the stacking system just as managing one device.
FIG. 1 is a schematic diagram illustrating a structure of a typical stacking system in the prior art. As shown in FIG. 1, the stacking system includes multiple network devices which connect to one another via a stacking cable. The network devices are called stacking member devices and member devices for short. All member devices in the stacking system use the same global configuration including a global IP address and a VLAN number. One of the member devices is taken as a controller and manager in the stacking system and is called an Active device. The global configuration of the Active device is valid. Other member devices are taken as Standby devices, and the global configuration of the Standby devices is invalid. The stacking system includes two planes, i.e. a data plane and a control plane. The Active device is in charge of managing the control plane, including executing configuration, issuing configuration etc. The Standby devices are in charge of running the data plane and performing data transmission. The data needed by the Standby devices is issued by the Active device uniformly.
When a certain stacking link in the stacking system is in failure, among the Standby devices which can not connect to the Active device but can connect with one another, one Standby device is updated to be a new Active device by voting. And thus, there are two or more Active devices having the same global configuration in the stacking system. For an external network of the stacking system, one logic device corresponding to the stacking system is divided into two or more logic devices, and the two or more logic devices have the same global configuration. When the two or more logic devices having the same global configuration are connected with one another via another link, a network failure such as IP address collision may be caused. For example, when the link between Standby devices, called Standby1 and Standby2, in FIG. 1 is in failure, the Active device, called Active, can communicate with the Standby1 normally, but the Standby2 and the Standby3 can not communicate with the Active. If the Standby2 is updated to be a new Active device, called Active1, by voting between the Standby2 and the Standby3, the Active1 makes the preconfigured global configuration valid. At this time, the Active and the Active1 have the same global configuration, which may result in a failure of the external network. The case that there are two or more Active devices in the same time is called Multiple-Active.
Currently, a double Active devices detection and collision resolution mechanism is provided. For example, FIG. 2 shows a schematic diagram of the double Active devices detection and collision resolution based on Bidirectional Forwarding Detection (BFD). As shown in FIG. 2, a stacking system includes two member devices, i.e. an Active device, called Active and a Standby device, called Standby, one three-layer interface is selected from the Active and the Standby respectively as a BFD interface, different BFD interfaces are configured with different static routes, IP addresses of different network segments and parameters of BFD sessions, and then the BFD interfaces of the two member devices are connected via an extra network wire, e.g. a double-arrow dashed line shown in FIG. 2. According to the foregoing description, the Active and the Standby have the same global configuration.
When the stacking system works normally, the global configuration of the Active is valid. When the Active and the Standby detect that the stacking link between them is disconnected, the Standby is updated to be a new Active, called Active1, and thus there are two Active devices. Simultaneously, the configured parameters of the BFD interfaces of the Active and the Active1 are valid, and the BFD session between the Active and the Active1 is connected. If the BFD session is connected, it is determined that double Active devices are detected; at this time, all ports of the Active are shut down to leave only one Active device, thereby solving the collision of double Active devices.
However, the double Active devices detection and collision resolution mechanism only supports the stacking system including two member devices, but is not applicable to a stacking system including three or more member devices.